<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>会员列表</title>
	<hdjs />
	<js file='__PUBLIC__/js/mod.base.js,__PUBLIC__/js/mod.article.js' />
	<css file='__PUBLIC__/css/mod.base.css,__PUBLIC__/css/mod.article.css' />
</head>
<body>

	<script type="text/javascript" src="http://localhost/hdphp/hdcms/Static/cal/lhgcalendar.min.js"></script>
	<form class="hd-form" method="get">
	
		
		<div class="search">
			注册时间：
			<input id="begin_time" placeholder="开始时间" readonly="readonly" class="hd-w80" type="text" value="{$Think.get.search_begin_time}" name="search_begin_time">
			<script>
				$('#begin_time').calendar({
					format : 'yyyy-MM-dd'
				});
			</script>
			-
			<input id="end_time" placeholder="结束时间" readonly="readonly" class="hd-w80" type="text" value="{$Think.get.search_end_time}" name="search_end_time">
			<script>
				$('#end_time').calendar({
					format : 'yyyy-MM-dd'
				});
			</script>
		
			&nbsp;&nbsp;&nbsp;
			<if condition='$_GET["role"] eq 2'>
				<select name="grade_gid" class="hd-w100">
					<volist name='grade' id='v'>
					<option value="{$v.gid}" <if condition ='$_GET["grade_gid"] eq $v["gid"]'> selected='selected'</if>>{$v.gname}</option>
					</volist>
				</select>

			<else />
				<select name="group_id" class="hd-w100">
					<volist name='authGroup' id='v'>
						<option value="{$v.id}" <if condition ='$_GET["group_id"] eq $v["id"]'> selected='selected'</if>>{$v.title}</option>
					</volist>
				</select>
			</if>
			&nbsp;&nbsp;&nbsp;
					关键字：
			<input class="hd-w200" type="text" placeholder="请输入用户名..." value="{$Think.get.keyword}" name="keyword">
			<button class="hd-btn hd-btn-xm" type="submit">搜索</button>

			
		</div>
	</form>

	<div class="hd-menu-list">
		<ul>
			<li class="active">
				<a href="javascript:;">会员列表</a>
			</li>
			<li>
				<a href="{:U('User/add',array('role'=>$_GET['role']))}" >添加会员</a>
			</li>
			<!-- <li>
				<a href="{:U('User/export',array('role'=>$_GET['role']))}" >导出会员</a>
			</li> -->
			
		</ul>
	</div>
		<div class="hd-title-header">温馨提示</div>
	<div class="help">
	    <ul>
	        <li>
	          会员列表
	        </li>
	    </ul>
	</div>
	<form action = '{:U("User/beachdelete")}' method='post' name="operationForm">
		<table class="hd-table hd-table-list hd-form">
			<thead>
				<tr>
					<td class="hd-w30">
						<input type="checkbox" id="selectAllContent"/>
					</td>
					<td class="hd-w30">UID</td>
					<td>用户名</td>
					<td class="hd-w80">登录次数</td>
					<td class="hd-w80">注册时间</td>
					<td class="hd-w80">最近登录</td>
					<td class="hd-w80">登录IP</td>
					<td class="hd-w50">状态</td>
					<td class="hd-w120">操作</td>
				</tr>
			</thead>
			<if condition = '$data'>
				<foreach name='data' item='v'>
					<tr>
						<td class="hd-w30">

							<input <if condition='$v["uid"] eq 1'>disabled='disabled'</if>type="checkbox"  name="uid[{$v.uid}]" value="{$v.uid}"/>
						</td>
						<td class="hd-w30">{$v.uid}</td>
						<td class="hd-w30">{$v.username}</td>
						<td>{$v.times}</td>
						<td class="hd-w50">{$v.addtime|date='Y-m-d H:i:s',###}</td>
						<td class="hd-w100"><if condition='$v["login_time"]'>{$v.login_time|date='Y-m-d H:i:s',###}<else/>未登录</if></td>
						<td class="hd-w80">{$v.login_ip}</td>
						<td class="hd-w80"><if condition="$v['is_lock']">锁定<else />正常</if></td>
						<td class="hd-w120">
							<if condition='$v["uid"] neq 1'>
							<a href="{:U('User/edit',array('uid'=>$v['uid'],'role'=>$v['role']))}">编辑</a>
							|
							<a href="javascript:;" onclick="del_modal('{:U('User/del',array('uid'=>$v['uid'],'role'=>$v['role']))}')">删除</a>
							</if>
							
						</td>
					</tr>
				</foreach>
				<tr>
				<td colspan="9" class='page'>{$page}</td>
				</tr>
			<else />
			<tr>
				<td colspan="9">没有找到符合的记录</td>
			</tr>
			</if>

		</table>
		<div class="hd-page"></div>

		<input type="hidden" name='role' value="{$Think.get.role}" />
		<input type="button" class="hd-btn hd-btn-xm select_all"  value="全选" />
		
		<input type="button" class="hd-btn hd-btn-xm operation"  value="批量删除" name="update_del"/>

		<input type="button" class="hd-btn hd-btn-xm operation"  value="锁定" name="update_check_lock"/>
		<input type="button" class="hd-btn hd-btn-xm operation"  value="取消锁定" name="update_cancle_lock"/>
		
	</form>
	
</body>
</html>